package com.design3.graduatethesissys.domain;

import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

/** 
* @author 作者 罗穆健: 
* @version 创建时间：2020年1月10日 下午4:03:43 
* 类说明 
*/
public class Regist {

	String username;// 这个是账号也就是学号
	String name;
	String password;
	String role;// 学生还是老师,传进来的是ROLE_STUDENT,ROLE_TEACHER		
	String sex;
	String phone;
	String mail;
	String id;
	String stu_id; // 这个不用传
	String stu_name; // 这个不用传
	String stu_sex; // 这个不用传
	String stu_phone;// 这个不用传
	String stu_mail;// 这个不用传
	String stu_status;// 这个不用传
	String teh_id;// 这个不用传
	String teh_name;// 这个不用传
	String teh_sex;// 这个不用传
	String teh_phone;// 这个不用传
	String teh_email;// 这个不用传
	
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		PasswordEncoder encoder = new BCryptPasswordEncoder();
		password = encoder.encode(password);
		this.password = password;
	}
	public String getRole() {
		return role;
	}
	public void setRole(String role) {
		this.role = role;
	}
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public String getMail() {
		return mail;
	}
	public void setMail(String mail) {
		this.mail = mail;
	}
	public String getStu_id() {
		return stu_id;
	}
	public void setStu_id(String stu_id) {
		this.stu_id = stu_id;
	}
	public String getStu_name() {
		return stu_name;
	}
	public void setStu_name(String stu_name) {
		this.stu_name = stu_name;
	}
	public String getStu_sex() {
		return stu_sex;
	}
	public void setStu_sex(String stu_sex) {
		this.stu_sex = stu_sex;
	}
	public String getStu_phone() {
		return stu_phone;
	}
	public void setStu_phone(String stu_phone) {
		this.stu_phone = stu_phone;
	}
	public String getStu_mail() {
		return stu_mail;
	}
	public void setStu_mail(String stu_mail) {
		this.stu_mail = stu_mail;
	}
	public String getStu_status() {
		return stu_status;
	}
	public void setStu_status(String stu_status) {
		this.stu_status = stu_status;
	}
	public String getTeh_id() {
		return teh_id;
	}
	public void setTeh_id(String teh_id) {
		this.teh_id = teh_id;
	}
	public String getTeh_name() {
		return teh_name;
	}
	public void setTeh_name(String teh_name) {
		this.teh_name = teh_name;
	}
	public String getTeh_sex() {
		return teh_sex;
	}
	public void setTeh_sex(String teh_sex) {
		this.teh_sex = teh_sex;
	}
	public String getTeh_phone() {
		return teh_phone;
	}
	public void setTeh_phone(String teh_phone) {
		this.teh_phone = teh_phone;
	}
	public String getTeh_email() {
		return teh_email;
	}
	public void setTeh_email(String teh_email) {
		this.teh_email = teh_email;
	}
	@Override
	public String toString() {
		return "Regist [username=" + username + ", name=" + name + ", password=" + password + ", role=" + role
				+ ", sex=" + sex + ", phone=" + phone + ", mail=" + mail + ", stu_id=" + stu_id + ", stu_name="
				+ stu_name + ", stu_sex=" + stu_sex + ", stu_phone=" + stu_phone + ", stu_mail=" + stu_mail
				+ ", stu_status=" + stu_status + ", teh_id=" + teh_id + ", teh_name=" + teh_name + ", teh_sex="
				+ teh_sex + ", teh_phone=" + teh_phone + ", teh_email=" + teh_email + "]";
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	
}
 